# Contributor: Díaz Urbaneja Diego <sodomon2@gmail.com>
# Maintainer: Díaz Urbaneja Diego <sodomon2@gmail.com>
pkgname=cdogs-sdl
pkgver=1.4.2
pkgrel=0
pkgdesc="Classic overhead run-and-gun game"
url="https://cxong.github.io/cdogs-sdl/"
arch="all"
license="GPL-2.0-or-later AND BSD-2-Clause"
makedepends="
	cmake
	gtk+3.0-dev
	mesa-dev
	samurai
	sdl2-dev
	sdl2_image-dev
	sdl2_mixer-dev
	"
options="!check" #make check not implemented
source="$pkgname-$pkgver.tar.gz::https://github.com/cxong/cdogs-sdl/archive/$pkgver.tar.gz
	no-werror.patch
	"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr/share/cdogs-sdl/ \
		-DCDOGS_DATA_DIR=/usr/share/cdogs-sdl/ \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	mv "$pkgdir"/usr/share/cdogs-sdl/bin/ "$pkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/cdogs-sdl/share/* "$pkgdir"/usr/share/
}

sha512sums="
36bea4eb1f11c4abc752695455f30b6f76b6c3aab02d57ece0f8a77d116c7810a5ebcc211de441a6487bc43d977dfab84ffa56b4aa5a8a45cdff5e2810c4fddf  cdogs-sdl-1.4.2.tar.gz
d4eedbfe425d659ee3fff0203f2dd49640da394db895964416ea86a98f601ee8136ac129f1c3c48b9bd525bf5e34854a861bfc881fb997ae7c61a01227137a89  no-werror.patch
"
